import Cookies from 'js-cookie';
const TOKEN = "KEY_TOKEN";

/**
 * 设置token
 * @param {*} token 
 */
export const setCookie = (token) =>{
    Cookies.set(TOKEN,token,{ expires: 99999 });
}

/**
 * 获取token
 */
export const getCookie = () =>{
    return Cookies.get(TOKEN);
}

/**
 * 移除token
 * @param {*} token 
 */
export const removeToken = () => {
     Cookies.remove(TOKEN);
}
